/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2024-05-19
 * Time: 20:37
 */
public class Cat {
    public static String name;
    public  int age;
    public static double weight;

    {
        System.out.println("实例代码块被执行了....");
        this.age = 5;
    }

    static {
        Cat.name = "小黑";
        System.out.println("静态代码块被执行了....");
    }


    public Cat() {
        System.out.println("构造方法被执行了....");
    }

    //    public Cat(String name, int age, double weight) {
//        Cat.name = name;
//        Cat.age = age;
//        Cat.weight = weight;
//    }
}
